<div>
	<?php //var_dump($company); ?>
	
	<h1>Детали за фирма</h1>
	<div class="content_div">
		<h2><?php echo $company['Company']['name']; ?></h2>
	</div>
	
	<div class="content_div">
		<label>Адреса:&nbsp;<?php echo $company['Company']['address']; ?></label>
		<label>Град:&nbsp;<?php echo $company['City']['name']; ?></label>
		<label>Телефон:&nbsp;<?php echo $company['Company']['phone']; ?></label>
		<label>Контакт лице:&nbsp;<?php echo $company['Company']['contact_person']; ?></label>
		<label>Username:&nbsp;<?php echo $company['User']['username']; ?></label>
		<label>Email:&nbsp;<?php echo $company['User']['email']; ?></label>
	</div>
	<hr/>
	<div class="content_div">
		<label>Објекти</label>
		<?php if(0 != sizeof($company['Objekt'])): ?>
		<table>
			<?php echo $html->tableHeaders(array("Објект","Контакт лице","Телефон")); ?>
			
			<?php foreach($company['Objekt'] as $objekt): ?>
			
				<?php
					 echo $html->tableCells(
					 		array(
					 			$objekt['name'],
					 			$objekt['contact_person'],
					 			$objekt['phone']
					 		)
					 	); 
				?>
				
			<?php endforeach; ?>
		</table>
		<?php endif; ?>
	</div>
	
	<div class="content_div">
		<?php 
			echo $html->link(
						"Креирај објект",
						array(
							'controller'=>'objekts',
							'action'=>'create',
							'company'=>$company['Company']['id']
						)
				); 
		?>
	</div>

</div>
